package com.nbufe.command.demo1;

/**
 * @Author Zan
 * @Create 2024/6/3 8:38
 * @ClassName: Client
 * @Description : TODO 请用一句话描述该类的功能
 */
public class Client {
    public static void main(String[] args) {
        FBSettingWindow fbSettingWindow = new FBSettingWindow("Windows设置页面");

        FunctionButton functionButton1 = new FunctionButton("最小化按钮");
        functionButton1.setCommand(new MinimizeCommand());

        FunctionButton functionButton2 = new FunctionButton("最大化按钮");
        functionButton2.setCommand(new MaximizeCommand());

        FunctionButton functionButton3 = new FunctionButton("打开按钮");
        functionButton3.setCommand(new OpenCommand());

        FunctionButton functionButton4 = new FunctionButton("关闭按钮");
        functionButton4.setCommand(new CloseCommand());

        fbSettingWindow.addFunctionButton(functionButton1);
        fbSettingWindow.addFunctionButton(functionButton2);
        fbSettingWindow.addFunctionButton(functionButton3);
        fbSettingWindow.addFunctionButton(functionButton4);

        fbSettingWindow.display();
        functionButton1.onClick();
        functionButton4.onClick();
    }
}
